#ifndef GIFHEADER_H
#define GIFHEADER_H

#include "gifblock.h"
#include "giflogicalscreendescriptor.h"

namespace WingGif {

class WINGEXPORT GifHeader : public GifBlock {
  Q_OBJECT

  Q_PROPERTY(QString signature READ signature)
  Q_PROPERTY(QString version READ version)
  Q_PROPERTY(GifLogicalScreenDescriptor *logicalScreenDescriptor READ
                 logicalScreenDescriptor)
public:
  GifHeader(QObject *parent = nullptr);

  QString signature();
  QString version();
  GifLogicalScreenDescriptor *logicalScreenDescriptor();

  GifBlockKind kind() override;
  bool read(QIODevice *stream,
            QList<GifExtension *> controlExtensions) override;

private:
  QString _signature;
  QString _version;
  GifLogicalScreenDescriptor *_logicalScreenDescriptor;
};

} // namespace WingGif

#endif // GIFHEADER_H
